home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{F3376356-3242-11D3-83BB-F6844B1D6002}#1.1#0"; "CONTRO~1.OCX"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Begin VB.Form Form1
- Caption = "List Maker"
- ClientHeight = 3480
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4680
- Icon = "Form1.frx":0000
- LinkTopic = "Form1"
- ScaleHeight = 3480
- ScaleWidth = 4680
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command3
- Caption = "Reset Counter"
- Height = 315
- Left = 120
- TabIndex = 8
- Top = 3120
- Width = 4455
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 2160
- Top = 1320
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin VB.CommandButton Command2
- Caption = "Save List To txt File"
- Height = 375
- Left = 2400
- TabIndex = 6
- Top = 2760
- Width = 2175
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 1680
- TabIndex = 5
- Top = 600
- Width = 2895
- End
- Begin VB.CommandButton Command1
- Caption = "Count"
- Height = 375
- Left = 120
- TabIndex = 4
- Top = 2760
- Width = 2175
- End
- Begin VB.ListBox List1
- Height = 1425
- ItemData = "Form1.frx":0442
- Left = 1680
- List = "Form1.frx":0444
- TabIndex = 3
- Top = 960
- Width = 2895
- End
- Begin VB.DirListBox Dir1
- Height = 1890
- Left = 0
- TabIndex = 1
- Top = 480
- Width = 1575
- End
- Begin VB.DriveListBox Drive1
- Height = 315
- Left = 0
- TabIndex = 0
- Top = 120
- Width = 1575
- End
- Begin VB.Label Label2
- Height = 255
- Left = 120
- TabIndex = 7
- Top = 2520
- Width = 4455
- End
- Begin VB.Label Label1
- Caption = "What type of file are you looking for? ex: *.mp3 leave blank for *.*"
- Height = 495
- Left = 1680
- TabIndex = 2
- Top = 120
- Width = 2895
- End
- Begin ControlResizer.AutoResizer AutoResizer1
- Height = 3255
- Left = 0
- Top = 0
- Width = 4695
- _ExtentX = 8281
- _ExtentY = 5741
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim total As Integer
- Dim FileArray() As String
- Dim strFile As String
- Dim x As Integer
- Dim strFilePath As String
- Dim strPath As String
- Private Sub Command1_Click()
- total = total + List1.ListCount
- Label2.Caption = "File Count= " & total
- End Sub
- Private Sub Command2_Click()
- On Error GoTo errhandler
- CommonDialog1.Filter = "Text Files (*.txt)|*.txt"
- CommonDialog1.ShowSave
- CommonDialog1.CancelError = True
- If Dir(CommonDialog1.FileName) = "" Then
- Open CommonDialog1.FileName For Output As #1
- Open CommonDialog1.FileName For Append As #1
- End If
- Print #1,
- Print #1, strPath
- Print #1,
- For x = 0 To List1.ListCount - 1
- Print #1, List1.List(x)
- Next x
- Print #1,
- Print #1,
- Print #1, "Accumulated File Count= " & total
- Print #1, "Made with ISeeAll's List Maker"
- Close #1
- errhandler:
- End Sub
- Private Sub Command3_Click()
- Label2.Caption = "File Count= 0"
- total = 0
- End Sub
- Private Sub Dir1_Change()
- List1.Clear
- On Error GoTo errhandler
- strPath = Dir1.Path
- If Len(strPath) > 3 Then
- strPath = strPath & "\"
- End If
- strPath = strPath & Text1.Text
- x = 0
- strFile = Dir(strPath)
- Do Until strFile = ""
- ReDim Preserve FileArray(x)
- FileArray(x) = strFile
- strFile = Dir
- x = x + 1
- Loop
- For x = 1 To UBound(FileArray())
- List1.AddItem FileArray(x)
- Exit Sub
- errhandler:
- End Sub
- Private Sub Drive1_Change()
- Dir1.Path = Drive1.Drive
- End Sub
-